using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Web;

using JsonFx.Json;

using BadWeb;

namespace TwitterNET
{
    public class Timeline
    {
        public static string USER_TIMELINE = "http://twitter.com/statuses/user_timeline.json";

        public static string GetUserTimeLine()
        {
            HttpVar varUser = new HttpVar("id", User.USERNAME);
            List<HttpVar> vars = new List<HttpVar>();
            vars.Add(varUser);

            //string jsonResponse = Get.DoGet(USER_TIMELINE, new List<HttpVar>());
            string blah = string.Empty;
            string jsonResponse = Get.DoGet(USER_TIMELINE, vars, new List<HttpHeader>(), "application/x-www-urlencoded", "", "", "", ref blah);

            JsonReader jsonReader = new JsonReader(jsonResponse);

            JsonObject[] objs = (JsonObject[]) jsonReader.Deserialize();

            for (int n = 0; n < objs.Length; n++)
            {
                JsonObject thisObj = (JsonObject) objs[n];

                //thisObj["name"]
            }



            return jsonResponse;
        }
    }
}
